package com.qcby.controller;

import com.qcby.entity.Result;
import com.qcby.entity.Shop;
import com.qcby.service.RecommendationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/recommendation")
@RestController
public class RecommendationController {
    @Autowired
    private RecommendationService recommendationService;
    @RequestMapping("/findShopById")
    public Result findShopById(Integer id){
        List<Shop> shops = recommendationService.findShopById(id);
        return Result.success(shops);
    }
    @RequestMapping("/findShopByIds")
    public Result findShopByIds(List<Integer> ids){
        List<Shop> shops = recommendationService.findShopByIds(ids);
        return Result.success(shops);
    }
}
